<template>
  <div class="address_container">
      <AddresHeader/>
      <!-- 地址 -->
      <div class="address_wrapper">
          <van-address-list
            :list="list"
            default-tag-text="默认"
            @add="onAdd"
            @edit="onEdit"
            />
      </div>
  </div>
</template>

<script>
import AddresHeader from "./AddresHeader";
export default {
    components:{
        AddresHeader,
    },
  data() {
    return {
      list: [...this.$store.state.cityList],
    };
  },
  methods: {
    onAdd() {
      this.$toast("新增地址")
    },
    onEdit(item, index) {
      this.$toast('编辑地址:' + index);
    },
  },
};
</script>

<style scoped>
.address_container
{
    width: 100vw;
    height: 100vh;
    /* background-color: orange; */
}

.address_wrapper
{
    margin-top: 64px;
}
</style>